home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000728_marca@wintermu….ncsa.uiuc.edu _Fri Mar 5 06:56:21 1993.msg < prev    next >
Internet Message Format  |  1994-01-24  |  3KB

  1. Return-Path: <marca@wintermute.ncsa.uiuc.edu>
  2. Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
  3.     id AA29117; Fri, 5 Mar 93 06:56:21 MET
  4. Received: from newton.ncsa.uiuc.edu by dxmint.cern.ch (5.65/DEC-Ultrix/4.3)
  5.     id AA23467; Fri, 5 Mar 1993 07:13:50 +0100
  6. Received: from wintermute.ncsa.uiuc.edu by newton.ncsa.uiuc.edu with SMTP id AA11150
  7.   (5.65a/IDA-1.4.2 for www-talk@nxoc01.cern.ch); Fri, 5 Mar 93 00:13:47 -0600
  8. Received: by wintermute.ncsa.uiuc.edu (920110.SGI/911001.SGI)
  9.     for @newton.ncsa.uiuc.edu:www-talk@nxoc01.cern.ch id AA05770; Fri, 5 Mar 93 00:15:36 -0800
  10. Date: Fri, 5 Mar 93 00:15:36 -0800
  11. From: marca@ncsa.uiuc.edu (Marc Andreessen)
  12. Message-Id: <9303050815.AA05770@wintermute.ncsa.uiuc.edu>
  13. To: www-talk@nxoc01.cern.ch
  14. Subject: multimedia files over httpd
  15. X-Md4-Signature: 2a57437c7fe621084fe8cdaa610a5778
  16.  
  17. Some people using NCSA Mosaic 0.9 have noticed that they can't put
  18. multimedia files on their own httpd servers and retrieve them
  19. correctly with Mosaic.  What's happening in most cases is that the WWW
  20. Daemon is prepending <PLAINTEXT> to the head of those files.
  21.  
  22. The problem lies in HTRetrieve.c, line 180:
  23.  
  24.     if (*extension == '.') {
  25.         return    0==strcmp(".html", extension) ? WWW_HTML
  26.                 : 0==strcmp(".rtf",  extension) ? WWW_RICHTEXT
  27.                 : 0==strcmp(".txt",  extension) ? WWW_PLAINTEXT
  28.                 : 0==strcmp(".tar",  extension) ? WWW_BINARY
  29.                 : 0==strcmp(".hqx",  extension) ? WWW_BINARY
  30.                 : 0==strcmp(".Z",  extension) ? WWW_BINARY
  31.                 : WWW_PLAINTEXT;        /* Unrecognised : try plain text */
  32.     } else {
  33.         return WWW_PLAINTEXT;
  34.     }
  35.  
  36. ...and line 295:
  37.  
  38.         /* Tell the client which format is to be sent */
  39.         if (format == WWW_HTML) {
  40.             status = read_file(soc, fd);
  41.         } else {
  42.             if (format==WWW_PLAINTEXT) {
  43. #ifdef USE_PLAINTEXT
  44.                 HTWriteASCII(soc, "<PLAINTEXT>\r\n");
  45.                 read_file(soc, fd);
  46. #else
  47.                 HTWriteASCII(soc, "<HEAD></HEAD><BODY>\r\n");
  48.                 HTSendPreformatted(soc, fd);
  49.                 HTWriteASCII(soc, "</BODY>\r\n");
  50. #endif
  51.             } else {
  52.                 HTWriteASCII(soc,
  53. "Sorry, this document appears to be neither a plain text file nor hypertext file.\n");
  54.                 HTWriteASCII(soc,
  55. "The current version of www does not yet handle multiple formats. Watch this space...\n");
  56.                 free(document_name);
  57.                 return fd;
  58.             }
  59.         }
  60.  
  61. Basically, if you hack this so it just sends back files with
  62. unrecognized extensions (or some set of extensions that your server
  63. would like to serve) without prepending anything, things will work.
  64. The only gotcha I've found is that anything on the server without the
  65. extension .txt will no longer be given a free ride as <plaintext> from
  66. the server to the client.
  67.  
  68. An alternate solution is to put your images, sound files, etc. on your
  69. anonymous FTP server or (shudder) your Gopher server and then point to
  70. them at that location from your HTML documents.
  71.  
  72. Cheers,
  73. Marc
  74.  
  75. --
  76. Marc Andreessen
  77. Software Development Group
  78. National Center for Supercomputing Applications
  79. marca@ncsa.uiuc.edu
  80.